<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/12/6
 * Time: 11:12
 */
$username=$_POST["username"];
$password=$_POST["password"];
if (!isset($username)||!isset($password)){
    exit("账号或密码为空！");
}

//1.登入判断： 用户名：admin
//            密码：888888
if ($username!="admin" ||$password!="888888"){
    exit("账号或密码错误！");
}

setcookie("Token",md5($username.$password.time()));

echo "<h1>登录成功<a href='index.php'>点击此去用户中心</a></h1>";
